package com.yang.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yang.dao.RoleDao;
import com.yang.model.Role;
import com.yang.model.User;
import com.yang.service.RoleService;

@Service
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleDao roleDao;
	@Override
	public List<Role> getAllRoles() {
		return roleDao.getAllRoles();
	}
	@Override
	public List<Integer> getCurrentRoles(Integer userId) {
		
		return roleDao.getCurrentRoles(userId);
	}
	@Override
	public List<Role> queryRoles(Map<String, Object> map) {
		
		return roleDao.queryRoles(map);
	}
	@Override
	public List<Role> queryAllRoles(Map<String, Object> map) {
		
		return roleDao.queryAllRoles(map);
	}

}
